package com.qf.myrbac.controller;

import com.baomidou.kaptcha.Kaptcha;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping
public class KapcharController {
    @Autowired
    private Kaptcha kaptcha;

    @GetMapping("captcha.jpg")
    public void render(HttpServletRequest request) {
        kaptcha.render();
    }
}
